package com.gigmissions.client.ui.listeners;

import com.gigmissions.client.callbacks.LoginSignupCallbackHandler;
import com.gigmissions.client.config.GigMissionsConstants;
import com.gigmissions.client.config.GigMissionsMessages;
import com.gigmissions.client.services.LoginServiceAsync;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.inject.Inject;
import com.google.inject.Singleton;

@Singleton
public class LoginSignupHandler implements ClickHandler{

	private LoginServiceAsync loginService;
	LoginSignupCallbackHandler callback;
	
	public LoginSignupHandler(){
		
	
	}
	
	@Inject
	public LoginSignupHandler(LoginSignupCallbackHandler callback,LoginServiceAsync loginService,GigMissionsMessages messages,GigMissionsConstants constants){
		this.loginService = loginService;
		this.callback = callback;
	
	}
	
	@Override
	public void onClick(ClickEvent event) {
		
		//loginService.login(GWT.getHostPageBaseURL() + GWT.getModuleBaseURL(), callback);
		
		loginService.login("http://127.0.0.1:8888/Gigmissions.html?gwt.codesvr=127.0.0.1:9997", callback);
		
		
	}

	
	
	
	
	

}
